#include "game.h"
#include <iostream>
#include "round.h"
using namespace std;

int main() {
    //游戏开始，选择玩家数量
    cout << "Please choose the number of players (2~4): ";
    unsigned int n;
    cin >> n;
    cout << endl;
    while (n < 2 || n > 4) {
        cout << "Wrong input, please input again (2~4): ";
        cin >> n;
        cout << endl;
    }
    Game::setNumOfPlayers(n);
//    cout <<Game::getNumOfPlayers();
    //根据选择的玩家数量创建相对应玩家数量的Game
    try {
        Round round;
        round.play();
    } catch(GameException e) {
        cout << e.what();
    }
    Game::deleteInstance();

    return 0;
}